package com.dtyunxi.constant;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * mysql 数据类型和java数据类型对应表
 * <p/>
 * <br>==========================
 * <br> 公司：云徙科技
 * <br> 开发：wu.yingnan@dtyunxi.com
 * <br> 版本：1.0
 * <br> 创建时间：2017/4/11
 * <br>==========================
 */
public class TypeMapper {

    public static Map<String, String> mapper = Maps.newHashMap();

    static {
        mapper.put("char", "String");
        mapper.put("varchar", "String");
        mapper.put("blob", "byte[]");
        mapper.put("text", "String");
        mapper.put("integer", "Integer");
        mapper.put("int", "Integer");
        mapper.put("tinyint", "Integer");
        mapper.put("smallint", "Integer");
        mapper.put("mediaint", "Integer");
        mapper.put("bit", "Boolean");
        mapper.put("bigint", "Long");
        mapper.put("float", "Float");
        mapper.put("double", "Double");
        mapper.put("decimal", "BigDecimal");
        mapper.put("id", "Long");
        mapper.put("date", "Date");
        mapper.put("time", "Time");
        mapper.put("timestamp", "Date");
        mapper.put("datetime", "Date");
        mapper.put("year", "Date");
    }

}
